<?php


namespace app\admin\controllers;


use app\admin\services\AdminService;
use app\BaseController;
use app\Request;

class AdminController extends BaseController
{
    private $adminService;

    public function __construct(AdminService $adminService)
    {
        $this->adminService = $adminService;
    }

    public function index(Request $request)
    {
        $result = $this->adminService->search($request);
        return $this->success($result);
    }

    public function create(Request $request)
    {
        $result = $this->adminService->create($request);
        return $this->success($result);
    }
}
